JLIBS = -cp junit.jar:mysql-connector.jar:joda.jar:.
JC = javac

default: all

all: 
	$(JC) -g $(JLIBS) @sourcefiles

clean:
	$(RM) *.class

run: default
	java  $(JLIBS) Scheduler 1 RUNTEST

install: all
	mkdir -p /etc/spro-scheduler
	jar -cfm spro-scheduler.jar Manifest.txt *.class
	cp *.jar /etc/spro-scheduler
	cp runsched /etc/spro-scheduler
	chmod 755 /etc/spro-scheduler/*
	test ! -e /usr/local/bin/runsched && ln /etc/spro-scheduler/runsched /usr/local/bin/runsched
